package cn.stylefeng.guns.modular.manager.mapper;

import cn.stylefeng.guns.modular.manager.entity.ArchiveInfo;
import cn.stylefeng.guns.modular.manager.model.params.ArchiveInfoParam;
import cn.stylefeng.guns.modular.manager.model.params.ArchiveInfoReportParam;
import cn.stylefeng.guns.modular.manager.model.result.ArchiveInfoReport;
import cn.stylefeng.guns.modular.manager.model.result.ArchiveInfoResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 档案信息表 Mapper 接口
 * </p>
 *
 * @author blesslp
 * @since 2019-11-20
 */
public interface ArchiveInfoMapper extends BaseMapper<ArchiveInfo> {

    /**
     * 获取列表
     *
     * @author blesslp
     * @Date 2019-11-20
     */
    List<ArchiveInfoResult> customList(@Param("paramCondition") ArchiveInfoParam paramCondition);

    /**
     * 获取map列表
     *
     * @author blesslp
     * @Date 2019-11-20
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ArchiveInfoParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author blesslp
     * @Date 2019-11-20
     */
    Page<ArchiveInfoResult> customPageList(@Param("page") Page page, @Param("paramCondition") ArchiveInfoParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author blesslp
     * @Date 2019-11-20
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ArchiveInfoParam paramCondition);

    /**
     * 通过nd分组
     * @return
     */
    List<Map<String, Object>> groupByNd();

    /**
     * 通过部门分组
     * @return
     */
    List<Map<String, Object>> groupByBm();

    /**
     * 通过档案位置分组
     * @return
     */
    List<Map<String, Object>> groupByDah();

    List<ArchiveInfoReport> report(@Param("paramCondition") ArchiveInfoReportParam param);

}
